<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018-07-19
 * Time: 下午 3:13
 * 记录model
 */
namespace app\admin\model;
use think\Model;

class RecodeModel extends Model
{
    // 确定链接表名
    protected $name = 'recode';
    //查询会员记录列表
    public function getRecodeByWhere($where, $offset, $limit,$join,$condition)
    {
        return $this->where($where)->join($join,$condition)->limit($offset, $limit)->order('snake_recode.recode_id desc')->select();
    }
    //查询会员列表
    public function getRecodeCount($where,$join,$condition)
    {
        return $this->where($where)->join($join,$condition)->count();
    }
    //删除记录
    public function getRecodeDel($map){
     return $this->where($map)->delete();
    }
    //赠送类型
    public function getType($type){
        if($type == 1){
            return '签到赠送';
        }
    }
}